How to view hidden files using Linux `find` command
        Posted  
        
            by Tom
        on Server Fault
        
        See other posts from Server Fault
        
            or by Tom
        
        
        
        Published on 2010-05-06T07:47:41Z
        Indexed on 
            2010/05/06
            7:58 UTC
        
        
        Read the original article
        Hit count: 453
        
On a Linux server, I need to find all files with a certain file extension in the current directory and all sub-directories.
Previously, I have always using the following command:
find . -type f | grep -i *.php
However, it doesn't find hidden files, for example .myhiddenphpfile.php. The following finds the hidden php files, but not the non-hidden ones:
find . -type f | grep -i \.*.php
How can I find both the hidden and non-hidden php files in the same command?
© Server Fault or respective owner